Repository navigation
Enable inference CUDA graphs with Shortcut MoE and wide residuals - #7772
Conversation
92bdc80 to
753297e
Compare
|
I suggest making the block scope default for inference. It is what we have been extensively using in Nemo-RL. |
@sidsingh-nvidia should we do this in this PR? |
040471c to
1d5f7d4
Compare
|
/ok to test 1d5f7d4 |
|
/ok to test 95f9b94 |
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
|
/ok to test c436ba3 |
Signed-off-by: Susav Shrestha <susavlsh10@gmail.com>
Head branch was pushed to by a user without write access
|
/ok to test 27c6495 |
|
/ok to test 0c70a59 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/38693382074 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/38705174583 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/38710370155 |
What does this PR do?
Enable local, block-scoped CUDA graphs for text inference with GDP, Shortcut MoE, and wide residuals.
The change fixes GDP decode padding during graph replay and the FP32 wide-residual to BF16 RMSNorm precision boundary.
Regression tests cover configuration validation, GDP padding, RMSNorm dtype, checkpoint routing, and eager-versus-graph generation through a small Shortcut MoE model.
Dependencies
Depends on #7752 (text-only MIMO checkpoint loading), #6855 (wide residual MTP/MIMO support), and #7440 (wide residual Shortcut MoE support).
This draft currently includes a tested integration merge of the wide-residual work. We will refresh the dependency revisions and narrow the diff against main as those PRs progress.
Issue tracking
For PRs from open-source community contributors:
Linked issue:
Contribution process
Pre-checks
jit_fuser/torch.compile, CUDA extension, TE or external-library dispatch, or a scatter/index accumulation), I have added or updated its bit-exact determinism test and registered it intests/unit_tests/determinism/kernels/manifest.py(guide)Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.